//创建一个路由器，并暴露出去
//第一步：引入createRouter、组件
import {createRouter, createWebHistory} from "vue-router";
//引入组件
import Home from "../components/Home.vue"
import About from "../components/About.vue"

//第二步：创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/home',
            component: Home,
        },
        {
            path: '/about',
            component: About,
        }
    ]
})

//暴露出去router
export default router